package com.donglan.pethome.basic.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author: zhangdonghui
 * @Date: 2021/10/25 10:36
 *
 * 查看lombok自动生成的类中所有方法：Alt + 7
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AjaxResult {
    private Boolean success = true;
    private String msg;

    //后端向前端响应的数据
    private Object resultObj;

    public AjaxResult(Boolean success,String msg){
        this.success = success;
        this.msg = msg;
    }

    public AjaxResult setResultObj(Object resultObj){
        this.resultObj = resultObj;
        return this;
    }


}
